package com.cn.ant.modules.wechat.service;

import com.cn.ant.common.service.BaseService;
import com.cn.ant.modules.wechat.dao.WeiXinTikitMapper;
import com.cn.ant.modules.wechat.entity.WeiXinTikit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 微信JS接口tikitService
 * @author AntDream
 * @version 2015-04-07
 */
@Component
@Transactional(readOnly = true)
public class WeiXinTikitService extends BaseService {

	@Autowired
	private WeiXinTikitMapper weiXinTikitMapper;
	
	public WeiXinTikit get(String id) {
		return weiXinTikitMapper.get(id);
	}

    public List<WeiXinTikit> queryForList(String appId) {
        return weiXinTikitMapper.query(appId);
    }

    @Transactional(readOnly = false)
	public void save(WeiXinTikit weiXinTikit) {
		weiXinTikitMapper.insert(weiXinTikit);
	}
	
	@Transactional(readOnly = false)
	public void update(WeiXinTikit weiXinTikit) {
		weiXinTikitMapper.update(weiXinTikit);
	}
	
	@Transactional(readOnly = false)
	public void delete(String id) {
		weiXinTikitMapper.delete(id);
	}
	
}
